package com.recsmile.sgs.client.commonds;

import com.recsmile.sgs.client.card.Card;
import com.recsmile.sgs.client.controller.DodgeUsableGameController;
import com.recsmile.sgs.client.entity.Game;

public class DodgeReactionInGameServerCommand extends InGameServerCommand {

	private static final long serialVersionUID = 8547546299242633692L;

	private final Card dodge;
	
	public DodgeReactionInGameServerCommand(Card card) {
		this.dodge = card;
	}
	@Override
	public void execute(Game game) {
		if (dodge != null) {
			game.<DodgeUsableGameController>getGameController().onDodgeUsed(dodge);
		} else {
			game.<DodgeUsableGameController>getGameController().onDodgeNotUsed();
		}
	}

}